home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
vidlibp
/
vidabout.frm
< prev
next >
Wrap
Text File
|
1995-05-01
|
8KB
|
241 lines
VERSION 2.00
Begin Form VidAbout
BorderStyle = 1 'Fixed Single
Caption = "About Video Library"
ClientHeight = 2460
ClientLeft = 1230
ClientTop = 795
ClientWidth = 4980
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 12
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 2865
HelpContextID = 430
Left = 1170
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2460
ScaleWidth = 4980
Top = 450
Width = 5100
Begin PictureBox picIcon
AutoSize = -1 'True
Height = 510
HelpContextID = 430
Left = 495
Picture = VIDABOUT.FRX:0000
ScaleHeight = 480
ScaleWidth = 480
TabIndex = 1
Top = 225
Width = 510
End
Begin CommandButton cmdOK
Cancel = -1 'True
Caption = "&OK"
Default = -1 'True
Height = 465
HelpContextID = 430
Left = 270
TabIndex = 0
Top = 1650
Width = 960
End
Begin Label lblResourcesValue
Height = 240
Left = 3330
TabIndex = 13
Top = 2100
Width = 1230
End
Begin Label lblSpaceValue
Height = 240
Left = 3330
TabIndex = 11
Top = 1875
Width = 1230
End
Begin Label lblWinModeValue
Height = 240
Left = 3330
TabIndex = 9
Top = 1650
Width = 1230
End
Begin Label lblWinVersionValue
Height = 240
Left = 3330
TabIndex = 7
Top = 1425
Width = 1230
End
Begin Label lblVersionValue
Height = 240
Left = 3330
TabIndex = 5
Top = 900
Width = 1230
End
Begin Label lblSpace
Caption = "Free Space:"
Height = 240
Left = 1620
TabIndex = 10
Top = 1875
Width = 1545
End
Begin Label lblWinMode
AutoSize = -1 'True
Caption = "Windows Mode:"
Height = 195
Left = 1620
TabIndex = 8
Top = 1650
Width = 1365
End
Begin Label lblWinVersion
Caption = "Windows Version:"
Height = 195
Left = 1620
TabIndex = 6
Top = 1425
Width = 1530
End
Begin Label lblResources
AutoSize = -1 'True
Caption = "Free Resources:"
Height = 195
Left = 1620
TabIndex = 12
Top = 2100
Width = 1410
End
Begin Line linDivide
BorderWidth = 3
X1 = 1620
X2 = 4545
Y1 = 1275
Y2 = 1275
End
Begin Label lblName
Alignment = 2 'Center
AutoSize = -1 'True
Caption = "Video Library Database Management System"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 555
Left = 1575
TabIndex = 3
Top = 225
Width = 3045
WordWrap = -1 'True
End
Begin Label lblVersion
AutoSize = -1 'True
Caption = "Version:"
Height = 195
Left = 1620
TabIndex = 4
Top = 900
Width = 705
End
Begin Label lblTitle
Alignment = 2 'Center
Caption = "Video Library"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 12
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 615
Left = 315
TabIndex = 2
Top = 825
Width = 915
End
End
' Subsystem: Help
' Module: VidAbout.Frm
' Date: 01/01/94
' Author: Richard Stauch
' Notes:
' The About form displays information about this program
' and the system. The information includes the version of
' this program, the Windows version and running mode, the
' amount of free space in the system and the percentage
' of free system resources.
' The OK button and Icon are the only controls, and
' there are no input-capable fields on this form.
Option Explicit
DefInt A-Z
' Get the binary flag for Windows running mode.
Declare Function GetWinFlags Lib "Kernel" () As Long
Const WF_ENHANCED = &H20
' Get free resource information.
Declare Function GetFreeSystemResources Lib "User" (ByVal fuSysResource As Integer) As Integer
Const GFSR_SYSTEMRESOURCES = &H0
' Get Windows Version.
Declare Function GetVersion Lib "Kernel" () As Integer
' Get free memory.
Declare Function GetFreeSpace Lib "Kernel" (ByVal wFlags As Integer) As Long
Sub cmdOK_Click ()
' Return to the main form.
Unload VidAbout
End Sub
Sub Form_Load ()
' Load the About form.
Dim X As Integer ' Temp for Windows version and system resources.
Dim Y As Integer ' Windows version Modification number.
Dim Z As Integer ' Windows version Release number.
Dim WinFlags As Long ' Windows mode flag.
Dim FreeSpace As Long ' Amount of free space in kilo-bytes.
' Display the version of this program.
lblVersionValue.Caption = VERSION
' Look up Windows Version number.
X% = GetVersion()
Y% = Int(X% / 256) ' This is the Least Significant Digit.
Z% = Int(X% - (Y% * 256)) ' This is the Most Significant Digit.
' Format and display as "9.99".
lblWinVersionValue.Caption = Trim(Str(Z%)) & "." & Trim(Str(Y%))
' Look up Windows mode.
WinFlags& = GetWinFlags()
' Determine if windows is in 386 Enhanced mode or Standard.
If WinFlags& And WF_ENHANCED Then
lblWinModeValue.Caption = "386 Enh"
Else
lblWinModeValue.Caption = "Standard"
End If
' Retrieve free memory space and convert to Kilo-bytes.
FreeSpace& = (GetFreeSpace(0) / 1024)
' Display free space as Kilo-bytes.
lblSpaceValue.Caption = Trim(FreeSpace&) & " Kb"
' Get the percent of free system resources.
X% = GetFreeSystemResources(GFSR_SYSTEMRESOURCES)
' Show the percent of resources available.
lblResourcesValue.Caption = Trim(Str(X%)) & "%"
End Sub
Sub picIcon_DblClick ()
' Display the first help topic in the Main help group.
Dim R As Integer
R% = WinHelp(VidAbout.hWnd, HelpName$, HELP_CONTEXT, CLng(VIDLIB_MAIN))
End Sub